package org.linlinjava.litemall.admin.web.order_manage;

import org.linlinjava.litemall.admin.form.*;
import org.linlinjava.litemall.admin.service.order_manage.AgedmallHomeSettingService;
import org.linlinjava.litemall.admin.service.order_manage.AgedmallShopWebPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("/shop/webpage")
public class AgedmallShopWebPageController {

    @Autowired
    private AgedmallShopWebPageService agedmallShopWebPageService;

    @PostMapping("list")
    public Object list(@RequestBody @Valid WebPageListForm webPageListForm){
        return agedmallShopWebPageService.list(webPageListForm);
    }

    @PostMapping("add")
    public Object add(@RequestBody @Valid WebPageAddForm webPageAddForm){
        return agedmallShopWebPageService.add(webPageAddForm);
    }

    @PostMapping("edit")
    public Object edit(@RequestBody @Valid WebPageEditForm webPageEditForm){
        return agedmallShopWebPageService.edit(webPageEditForm);
    }

    @PostMapping("delete")
    public Object delete(@RequestBody @Valid WebPageDeleteForm webPageDeleteForm){
        return agedmallShopWebPageService.delete(webPageDeleteForm);
    }

    @PostMapping("detail")
    public Object detail(@RequestBody @Valid WebPageDetailForm webPageDetailForm){
        return agedmallShopWebPageService.detail(webPageDetailForm);
    }

}
